package com.wanxi.coupons.config;


//import com.netflix.loadbalancer.IRule;
//import com.netflix.loadbalancer.RandomRule;
//import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author: lsp
 * @date: 2021/11/23 12:39
 * @description:
 */
@Configuration
public class RestConfig {

//    @LoadBalanced  //使用Ribbon实现负载均衡的调用 (spring cloud -> 封装ribbon + eureka + restTemplate)
//    @Bean
//    public RestTemplate restTemplate () {
//        return new RestTemplate();
//    }
//
//    @Bean
//    public IRule iRule() {
//        //采用轮询方式负载均衡
//        return new RandomRule();
//    }


}
